package com.learn.trycatch;

/**
 * try - catch -finnaly test
 * @author chenxin
 * @time 2017-02-11-10:35
 */
public class TryTest {
    public static void main(String[] args) {
        int x = test();
        System.out.println(x);
    }

    private static int test(){
        int y = 0;
        try {
            throw new RuntimeException();
//            return 1;
        } catch (RuntimeException e){
            y = 2;
            return 4;
//            return y;
        } finally {
//            int x = 2/0;
            y = 3;
            throw new RuntimeException("cds");
        }
    }
}
